Optimal. Leaf size=59 \[ \frac{(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0757744, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {2837, 778, 206} \[ \frac{(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2837
Rule 778
Rule 206
Rubi steps
\begin{align*} \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{b^3 \operatorname{Subst}\left (\int \frac{(a+x) \left (A+\frac{B x}{b}\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{\sec ^2(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{2 d}+\frac{(b (a A-b B)) \operatorname{Subst}\left (\int \frac{1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=\frac{(a A-b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{\sec ^2(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{2 d}\\ \end{align*}
Mathematica [A] time = 0.209759, size = 54, normalized size = 0.92 \[ \frac{(a A-b B) \tanh ^{-1}(\sin (c+d x))+\sec ^2(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.077, size = 129, normalized size = 2.2 \begin{align*}{\frac{aA\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}}+{\frac{aA\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}}+{\frac{aB}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{Ab}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{B \left ( \sin \left ( dx+c \right ) \right ) ^{3}b}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{Bb\sin \left ( dx+c \right ) }{2\,d}}-{\frac{Bb\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.989002, size = 105, normalized size = 1.78 \begin{align*} \frac{{\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac{2 \,{\left (B a + A b +{\left (A a + B b\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.43386, size = 232, normalized size = 3.93 \begin{align*} \frac{{\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a + 2 \, A b + 2 \,{\left (A a + B b\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30888, size = 113, normalized size = 1.92 \begin{align*} \frac{{\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) -{\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac{2 \,{\left (A a \sin \left (d x + c\right ) + B b \sin \left (d x + c\right ) + B a + A b\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]